/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package edu.wpi.first.wpilibj.templates.commands;

/**
 *
 * @author Jarrod Risley
 */
public class BumpArm extends CommandBase {
    
    /*
     * Global Class Variables
     */
    double commandedPosition;
    private boolean isFinished;
    
    public BumpArm(double pos) {
        // Use requires() here to declare subsystem dependencies
        // eg. requires(chassis);
        requires(mainArm);
        commandedPosition = pos;
    }

    // Called just before this Command runs the first time
    protected void initialize() {
        mainArm.setPosition(mainArm.getLocation() + commandedPosition);
        
        System.out.println("Location is: " + mainArm.getLocation());
        System.out.println("Commanded position is: " + commandedPosition);
        
    }

    // Called repeatedly when this Command is scheduled to run
    protected void execute() {
        isFinished = true;
    }

    // Make this return true when this Command no longer needs to run execute()
    protected boolean isFinished() {
        return isFinished;
    }

    // Called once after isFinished returns true
    protected void end() {
    }

    // Called when another command which requires one or more of the same
    // subsystems is scheduled to run
    protected void interrupted() {
    }
}
